﻿using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web.Http;
using Abp.Application.Services;
using RMM.ShopAppService.Dtos;
using RMM.Shops.Dtos;
using RMM.FrameWork;
using RMM.Core.Entity.Shops;
using Swashbuckle.Swagger.Annotations;
using System.Net;
using RMM.Core.Entity.Orders;

namespace RMM.ShopAppService
{
    public interface IShopAppService : IApplicationService
    {
        /// <summary>
        /// id获取店铺信息
        /// </summary>
        /// <param name="shopId"></param>
        /// <returns></returns>
        [HttpGet]
        [SwaggerResponse(HttpStatusCode.OK,Type = typeof(ShopArg))]
        Task<ResultDto> GetShopByIdAsync(long shopId);

        /// <summary>
        /// 获取店铺列表
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        [SwaggerResponse(HttpStatusCode.OK, Type = typeof(List<ShopDto>))]
        Task<ResultDto> GetShopList(ShopInputDto dto);

        /// <summary>
        /// 获取范围内店铺列表
        /// </summary>
        /// <param name="lat"></param>
        /// <param name="lng"></param>
        /// <param name="kilometer"></param>
        /// <returns></returns>
        [HttpGet]
        [SwaggerResponse(HttpStatusCode.OK, Type = typeof(List<ShopDto>))]
        Task<ResultDto> GetShopByDistance(double lat, double lng, int kilometer);

        /// <summary>
        /// 快速下单获取最近的店铺
        /// </summary>
        /// <param name="lat"></param>
        /// <param name="lng"></param>
        /// <param name="cateId"></param>
        /// <returns></returns>
        [HttpGet]
        [SwaggerResponse(HttpStatusCode.OK, Type = typeof(ShopArg))]
        Task<ResultDto> GetOrderShopByDistance(double lat, double lng, int cateId);
        






        /// <summary>
        /// 后台调用
        /// </summary>
        /// <param name="lat"></param>
        /// <param name="lng"></param>
        /// <param name="shops"></param>
        /// <returns></returns>
        [HiddenApi]
        Task<ResultDto> GetShopByDistanceA(double lat, double lng, List<Shop> shops);

        /// <summary>
        /// 后台调用
        /// </summary>
        /// <param name="shopIds"></param>
        /// <returns></returns>
        [HiddenApi]
        Task<List<ShopDto>> GetShopListA(List<long> shopIds);
    }
}